package Spring;

import Spring.demo.component.BeanLifeComponent;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App2 {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");
        BeanLifeComponent life = context.getBean("beanLifeComponent",BeanLifeComponent.class);
        System.out.println(" 使用Bean⽅法");
        // 执⾏销毁⽅法
        context.destroy();
    }
}
